<?php
$html = '';
foreach (Slider::getInstance()->images() as $img) {
    if ($img['url']) {
        $aOpen = '<a href="'.$img['url'].'" target="_blank">';
        $aClose = '</a>';
    }
    else {
        $aOpen = '';
        $aClose = '';
    }
    $html .= '
        <div class="slide">
            '.$aOpen.'<img src="content/slider/'.$img['src'].'">'.$aClose.'
        </div>
    ';
}
echo($html);
?>
